<template>
  <el-table :data="users">
    <el-table-column type="index" label="序号" width="80"></el-table-column>
    <el-table-column prop="username" label="用户名"> </el-table-column>

    <el-table-column prop="rname" label="身份"> </el-table-column>
  </el-table>
</template>

<script>
export default {
  name: "showRoles",
  data() {
    return {
      users: [],
    };
  },
  methods: {
    fetch() {
      let index=this.$route.query.index
      this.$http.get(`showRoles/${index}`).then(res=>{
        console.log(res)
        this.users=res.data.result;
      })
    },
    
  },
  created() {
    this.fetch();
  },
};
</script>

<style>
</style>